block active
  //- This block is used to set the active view name
  //- then we check it against the sidebar configuration 
  //- to set as active the current sidebar item 

// START Top Navbar
nav.navbar.topnavbar(role='navigation')
    // START navbar header
    .navbar-header
      button.navbar-toggle(type='button', data-toggle="collapse", data-target=".navbar-collapse")
        span.sr-only Toggle navigation
        span.icon-bar
        span.icon-bar
        span.icon-bar
      a.navbar-brand(href='#/') 
        .brand-logo 
          img.img-responsive(src="img/logo.png", alt="App Logo")
        .brand-logo-collapsed 
          img.img-responsive(src="img/logo-single.png", alt="App Logo")
    // END navbar header

    // START Nav wrapper
    .navbar-collapse.collapse
      // START Left navbar
      ul.nav.navbar-nav
        - each item, index in sidebar
          //- limit the items for demo. Bootstrap navbar doesn't not support too much elements
          - if (index < 3)
            - item.active = (sidebar_active==item.href)
            li(class=item.active?'active':'')
              - if (item.submenu)
                a(href=item.href, data-toggle="dropdown")= item.text
                ul.dropdown-menu(class="animated fadeIn")
                  - each subitem in item.submenu
                    li
                      a(href=subitem.href)= subitem.text
              - else if (!item.heading)
                a(href=item.href)= item.text
      // END Left navbar

      // START Right Navbar
      ul.nav.navbar-nav.navbar-right
        // START lock screen
        li.dropdown
          a(href="lock.html", title="Lock screen")
            em.icon-lock
        // END lock screen
        // Search icon
        li
          a(href='#', data-search-open="")
            em.icon-magnifier
        // Fullscreen (only desktops)
        li.visible-lg
          a(href='#', data-toggle-fullscreen="")
            em.fa.fa-expand
        // START Alert menu
        li.dropdown.dropdown-list
          a(href="#", data-toggle="dropdown")
            em.icon-bell
            .label.label-danger 11
          // START Dropdown menu
          ul.dropdown-menu(class="animated flipInX")
            li
              // START list group
              .list-group
                // list item
                a.list-group-item(href='#')
                  .media-box
                    .pull-left
                      em.fa.fa-twitter.fa-2x.text-info
                    .media-box-body.clearfix
                        p.m0 New followers
                        p.m0.text-muted: small 1 new follower
                // list item
                a.list-group-item(href='#')
                  .media-box
                    .pull-left
                      em.fa.fa-envelope.fa-2x.text-warning
                    .media-box-body.clearfix
                        p.m0 New e-mails
                        p.m0.text-muted: small You have 10 new emails
                // list item
                a.list-group-item(href='#')
                  .media-box
                    .pull-left
                      em.fa.fa-tasks.fa-2x.text-success
                    .media-box-body.clearfix
                        p.m0 Pending Tasks
                        p.m0.text-muted: small 11 pending task

                // last list item 
                a.list-group-item(href='#')
                  small More notifications
                  span.label.label-danger.pull-right 14
              // END list group
          // END Dropdown menu
        // END Alert menu
        // START Contacts button
        li
          a(href='#', data-toggle-state="offsidebar-open", data-no-persist="true")
            em.icon-notebook
        // END Contacts menu
      // END Right Navbar
    // END Nav wrapper
    
    // START Search form
    form.navbar-form(role='search', action="search.html")
      .form-group.has-feedback
        input.form-control(type='text', placeholder="Type and hit enter ...")
        .fa.fa-times.form-control-feedback(data-search-dismiss="")
      button.hidden.btn.btn-default(type='submit') Submit
    // END Search form

// END Top Navbar